package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CarRescueMapper;
import com.ruoyi.system.domain.CarRescue;
import com.ruoyi.system.service.ICarRescueService;

/**
 * 救援任务Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class CarRescueServiceImpl implements ICarRescueService 
{
    @Autowired
    private CarRescueMapper carRescueMapper;

    /**
     * 查询救援任务
     * 
     * @param id 救援任务主键
     * @return 救援任务
     */
    @Override
    public CarRescue selectCarRescueById(Integer id)
    {
        return carRescueMapper.selectCarRescueById(id);
    }

    /**
     * 查询救援任务列表
     * 
     * @param carRescue 救援任务
     * @return 救援任务
     */
    @Override
    public List<CarRescue> selectCarRescueList(CarRescue carRescue)
    {
        return carRescueMapper.selectCarRescueList(carRescue);
    }

    /**
     * 新增救援任务
     * 
     * @param carRescue 救援任务
     * @return 结果
     */
    @Override
    public int insertCarRescue(CarRescue carRescue)
    {
        return carRescueMapper.insertCarRescue(carRescue);
    }

    /**
     * 修改救援任务
     * 
     * @param carRescue 救援任务
     * @return 结果
     */
    @Override
    public int updateCarRescue(CarRescue carRescue)
    {
        return carRescueMapper.updateCarRescue(carRescue);
    }

    /**
     * 批量删除救援任务
     * 
     * @param ids 需要删除的救援任务主键
     * @return 结果
     */
    @Override
    public int deleteCarRescueByIds(Integer[] ids)
    {
        return carRescueMapper.deleteCarRescueByIds(ids);
    }

    /**
     * 删除救援任务信息
     * 
     * @param id 救援任务主键
     * @return 结果
     */
    @Override
    public int deleteCarRescueById(Integer id)
    {
        return carRescueMapper.deleteCarRescueById(id);
    }

    @Override
    public List<CarRescue> listByMerchantId(Integer mid)
    {
        return carRescueMapper.listByMerchantId(mid);
    }
}
